<?php
include "../dyn/connexion.php";
if(isset($_POST['idcadavre']) && isset($_POST['cadavre']) && isset($_POST['iduser']) && isset($_POST['user'])){
				$user=$_POST['user'];
				$iduser=$_POST['iduser'];
				$cadavre=$_POST['cadavre'];
				$idcadavre=$_POST['idcadavre'];
				$idlast =intval($_POST['idlast']);
				$row=mysql_fetch_array(mysql_query("SELECT id FROM CadavreExquis WHERE statut!=2 ORDER BY id DESC LIMIT 1"));
				$id=intval($row['id']);
				if($idlast == $id){
					mysql_query("INSERT INTO CadavreExquis VALUES ('','$user','$cadavre',NOW(),'$idcadavre','1','$iduser')");
				}
			}
?>